package com.fh.service.expand;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fh.dao.DaoSupport;
import com.fh.entity.EventComment;
import com.fh.entity.PlanContent;
import com.fh.entity.system.Menu;
import com.fh.util.PageData;

@Service("planContentService")
public class PlanContentService{

	@Resource(name = "daoSupport")
	private DaoSupport dao;
	
	/**
	 * 根据预案id删除预案（逻辑删除）
	 * @param id
	 * @throws Exception
	 */
	public void deletePlanContentById(Long id) throws Exception {
		dao.save("PlanContentMapper.deletePlanContentById", id);
		
	}

	/**
	 * 添加一条预案
	 * @param eventComment
	 * @throws Exception
	 */
	public void savePlanContent(PlanContent planContent) throws Exception {
		dao.save("PlanContentMapper.insertPlanContent", planContent);
	}

	/**
	 * 根据应急事件id获取对应的评论(列表)
	 * @param eventId
	 * @return
	 * @throws Exception
	 */
	public List<PlanContent> listAllPlanContent() throws Exception {
		return (List<PlanContent>) dao.findForList("PlanContentMapper.listAllPlanContent", null);
		
	}
	
}
